/* eslint-disable no-unused-vars */
/* eslint-disable no-undef */
const detailSetting = new Map([
  [
    "姓名",
    {
      vmodel: "form.name",
      rules: {
        regex: /^[\u4e00-\u9fa5a-zA-Z0-9]+$/,
        max: 32,
        required: true,
      },
      clearable: true,
      label: "姓名",
      placeholder: "请输入",
      editable: "vm.value",
    },
  ],
])

const dynamicStatesFormat = vm => {
  for (x in detailSetting.get("姓名")) {
    console.log(x)
  }
  detailSetting.forEach(setting => {
    console.log("setting", setting)
    console.log(Object.prototype.toString.call(setting))
    for (x of setting) {
      console.log(x)
      // if (setting[key].startsWith("vm.")) {
      //   setting[key] = eval(setting[key]);
      // }
    }
  })
  return detailSetting
}

// const detailSetting = [
//   {
//     type: "input",
//     placeholder: "请输入所属单位",
//     model: "",
//     component: FilterInput,
//     fieldName: "input_field"
//   },
// ];
export default dynamicStatesFormat
